﻿

using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.ComponentModel.DataAnnotations;

namespace Model
{
    
    public partial class MixedTaskCenterEntity 
    {
        [Key]
        /// <summary>
        /// MixedTaskCenterID
        /// </summary>
        public int? MixedTaskCenterID
        {
            get;
            set;
        }

        
        /// <summary>
        /// ContractNo
        /// </summary>
        public String ContractNo
        {
            get;
            set;
        }

        
        /// <summary>
        /// Factory
        /// </summary>
        public String Factory
        {
            get;
            set;
        }

  
        /// <summary>
        /// 外发类型
        /// </summary>
        public String ProcessType
        {
            get;
            set;
        }

    
        /// <summary>
        /// ProcessDescription
        /// </summary>
        public String ProcessDescription
        {
            get;
            set;
        }


        /// <summary>
        /// 外发厂家
        /// </summary>
        public String ForeignFactory
        {
            get;
            set;
        }

    
        /// <summary>
        /// ContractQty
        /// </summary>
        public Decimal? ContractQty
        {
            get;
            set;
        }

       
        /// <summary>
        /// ContractAmount
        /// </summary>
        public Decimal? ContractAmount
        {
            get;
            set;
        }

    
        /// <summary>
        /// TaxAdded
        /// </summary>
        public Decimal? TaxAdded
        {
            get;
            set;
        }

    
        /// <summary>
        /// Currency
        /// </summary>
        public String Currency
        {
            get;
            set;
        }

       
        /// <summary>
        /// 合同数据是来自哪里？可选的值有: 
        /// GEK: PlanningDB.pcContractHead
        /// GEW:   PPODB.scContract
        /// GES-1: PPCDB.pcContractHDR
        /// GES-2: DYSDB.pcScContractHDR
        /// GES-3: FYDB.pcScContractHdr
        /// GLS-1: PPCDB.pcContractHDR
        /// GLS-2: DYSDB.pcScContractHDR
        /// GLS-3: FYDB.pcScContractHdr
        /// OAS: GeneralTask
        /// </summary>
        public String DataSource
        {
            get;
            set;
        }

      
        /// <summary>
        /// TaskStatusID
        /// </summary>
        public int? TaskStatusID
        {
            get;
            set;
        }

      
        /// <summary>
        /// StatusDate
        /// </summary>
        public DateTime? StatusDate
        {
            get;
            set;
        }

       
        /// <summary>
        /// RecordVersion
        /// </summary>
        public string RecordVersion
        {
            get;
            set;
        }

       
        /// <summary>
        /// CreatedBy
        /// </summary>
        public String CreatedBy
        {
            get;
            set;
        }

     
        /// <summary>
        /// CreatedDate
        /// </summary>
        public DateTime? CreatedDate
        {
            get;
            set;
        }

     
        /// <summary>
        /// LastUpdatedBy
        /// </summary>
        public String LastUpdatedBy
        {
            get;
            set;
        }

    
        /// <summary>
        /// LastUpdatedDate
        /// </summary>
        public DateTime? LastUpdatedDate
        {
            get;
            set;
        }

        public string Description { get; set; }

        public DateTime? StartDateTime { get; set; }
        public DateTime? EndDateTime { get; set; }
        public string StatusStr { get; set; }

        /// <summary>
        /// 构造函数
        /// </summary>
        public MixedTaskCenterEntity()
        {
        }

        public MixedTaskCenterEntity(DataRow row)
        {
            ContractNo = row["ContractNo"].ToString();
            ProcessType = row["ProcessType"].ToString();
            ForeignFactory = row["ForeignFactory"].ToString();
            CreatedBy = row["CreatedBy"].ToString();
            if (!string.IsNullOrEmpty(row["CreatedDate"].ToString()))
            {
                CreatedDate = DateTime.Parse(row["CreatedDate"].ToString());
            }
            ContractQty = decimal.Parse(row["ContractQty"].ToString());
            Currency = row["Currency"].ToString();
            ContractAmount = decimal.Parse(row["ContractAmount"].ToString());
            Description = row["Description"].ToString();
            Factory = row["Factory"].ToString();
        }
    }
}
